package com.crm.jpaandthymeleaf.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author 周敬
 * @version 1.0
 * @packageName com.crm.jpaandthymeleaf.entity
 * @fileName SalPlan
 * @createTime 2021/12/15-20:19-星期三
 * @lastModify 2021/12/15-20:19-星期三
 */
@Entity
@Table(name = "sal_plan", schema = "crm", catalog = "")
public class SalPlan {
    private Long plaId;
    private Long plaChcId;
    private Timestamp plaDate;
    private String plaTodo;
    private String plaResult;

    @Id
    @Column(name = "pla_id")
    public Long getPlaId() {
        return plaId;
    }

    public void setPlaId(Long plaId) {
        this.plaId = plaId;
    }

    @Basic
    @Column(name = "pla_chc_id")
    public Long getPlaChcId() {
        return plaChcId;
    }

    public void setPlaChcId(Long plaChcId) {
        this.plaChcId = plaChcId;
    }

    @Basic
    @Column(name = "pla_date")
    public Timestamp getPlaDate() {
        return plaDate;
    }

    public void setPlaDate(Timestamp plaDate) {
        this.plaDate = plaDate;
    }

    @Basic
    @Column(name = "pla_todo")
    public String getPlaTodo() {
        return plaTodo;
    }

    public void setPlaTodo(String plaTodo) {
        this.plaTodo = plaTodo;
    }

    @Basic
    @Column(name = "pla_result")
    public String getPlaResult() {
        return plaResult;
    }

    public void setPlaResult(String plaResult) {
        this.plaResult = plaResult;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SalPlan salPlan = (SalPlan) o;
        return Objects.equals(plaId, salPlan.plaId) && Objects.equals(plaChcId, salPlan.plaChcId) && Objects.equals(plaDate, salPlan.plaDate) && Objects.equals(plaTodo, salPlan.plaTodo) && Objects.equals(plaResult, salPlan.plaResult);
    }

    @Override
    public int hashCode() {
        return Objects.hash(plaId, plaChcId, plaDate, plaTodo, plaResult);
    }
}
